/*
 * @Author: AiLjx
 * @Date: 2022-11-29 20:55:00
 * @LastEditors: AiLjx
 * @LastEditTime: 2022-11-30 17:32:21
 */

const operation = {
    left: { x: -1, y: 0, direction: "left" },
    top: { x: 0, y: -1, direction: "top" },
    right: { x: 1, y: 0, direction: "right" },
    bottom: { x: 0, y: 1, direction: "bottom" },
};

let snakeConfig = {
    step: 5, // 每得一分减少的延迟/增加的速度
    speed: 200, // 初始速度/延迟
    direction: operation.right,
    form: [
        { x: 0, y: 0, dom: null }, // 蛇的身体部分（单元格对象）
        { x: 1, y: 0, dom: null },
        { x: 2, y: 0, dom: null },
        { x: 3, y: 0, dom: null, isHead: true },
    ],
};
